package com.leenmvc.core.utils.socket;

import com.leenmvc.core.enums.SocketMessageType;
import java.util.Date;

/**
 * 用于描述接收到或者发送socket信息
 */
public class SocketMessage {

    /**
     * 由哪个客户端发出信息
     */
    private String clientId;

    /**
     * 发送的内容
     */
    private String content;

    /**
     * 主题
     */
    private String theme;

    /**
     * 接收时间或者
     */
    private Date time;

    /**
     * 从哪个客户端
     */
    private String from;

    /**
     * 到哪个客户端
     */
    private String to;

    /**
     * 到哪几个客户端
     */
    private String[] tos;

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    /**
     * 广播 - 0 发送给一个客户端 - 1 发送给一群 - 2  只发送给服务器 - 3
     */
    private SocketMessageType type;

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getTo() {
        return to;
    }

    public void setTo(String to) {
        this.to = to;
    }

    public String[] getTos() {
        return tos;
    }

    public void setTos(String[] tos) {
        this.tos = tos;
    }

    public SocketMessageType getType() {
        return type;
    }

    public void setType(SocketMessageType type) {
        this.type = type;
    }
}
